<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="/">
  <html>
   <head>
    <title>Test results</title>
    <style type="text/css">
    html,body{margin:15}
    table {
     max-width: 100%;
     background-color: #ffffff;
     border-collapse: collapse;
     border-spacing: 0;
    }
    .table {
     width: 100%;
     margin-bottom: 14pt;
    }
    .table th,
    .table td {
     padding: 8px;
     font-size: 14px;
     line-height: 14pt;
     vertical-align: top;
     border-bottom: 1px #eaeaea solid;
    }
    .table.hovered tbody tr:hover {
     background-color: rgba(28, 183, 236, 0.1);
    }
    .descr {
    padding-left: 40px;
    }
    .edescr {
    padding-left: 20px;
    }
    .block {
    padding-left: 20px;
    background-repeat: no-repeat;
    background-image: url();
    }
    .pass {
    padding-left: 20px;
    background-repeat: no-repeat;
    background-image: url();
    }
    .fail{
    padding-left: 20px;
    background-repeat: no-repeat;
    background-image: url();
    }
    </style>
<script type="text/javascript">window.onload=function(){var a=document.querySelectorAll('p.status');for(var i=0;i!=a.length;i++){switch(a[i].innerHTML){case'0':{a[i].innerHTML='Fail';a[i].className+=' fail';break}case'1':{a[i].innerHTML='Pass';a[i].className+=' pass';break}default:{}}}var x=document.querySelectorAll('p.edescr');for(var i=0;i!=x.length;i++){if(x[i].innerHTML=='-'){x[i].innerHTML='No errors';x[i].className+=' pass'}else{x[i].className+=' block'}}}</script>
   </head>
   <body>
    <h2>Test results</h2>
    <h4>
     <xsl:value-of select="testCaseList/timeInfo" />
    </h4>
    <h4>
     Testov vupolneno - <xsl:value-of select="testCaseList/size" />
    </h4>
    <h4>
     Proverok vupolneno - <xsl:value-of select="testCaseList/checksize" />
    </h4>
    <table class="table hovered">
     <xsl:for-each select="testCaseList/ListMessage/entry">
      <tr>
       <td  colspan='2'>
        <p>
         <b>
          <xsl:value-of select="key" />
         </b>
        </p>
        <p>
         Start test: <xsl:value-of select="value/startDate" /> - End test: <xsl:value-of select="value/finishDate" />
        </p>
        <p class='edescr'>
         <xsl:value-of select="value/errorDescription" />
        </p>
       </td>
      </tr>
        <xsl:for-each select="value/testMessage">
            <tr>
             <td>
              <p class='descr'>
               <xsl:value-of select="Description" />
              </p>
             </td>
             <td>
              <p class='status'>
               <xsl:value-of select="Status" />
              </p>
             </td>
            </tr>
        </xsl:for-each>
     </xsl:for-each>
    </table>
   </body>
  </html>
 </xsl:template>
</xsl:stylesheet>